module lib_module

    implicit none
    real, parameter :: pi = acos(-1.0)  !! 圆周率，值由编译器编译时确定

contains

    elemental subroutine get_ones(x)
        real, intent(out) :: x

        x = 1.0

    end subroutine get_ones
    ! ...

end module lib_module

program module

    use lib_module, only: pi
    implicit none

    print *, pi

end program module
!> 3.14159274